package cn.itcast.Thread_01;

import cn.itcast.Thread.MyThread;

public class MyThreadDemo_02 {
    public static void main(String[] args) {
        //创建线程类对象
        MyThread_02 mt02 = new MyThread_02();
        //给线程赋值
        mt02.setName("老三");
        //启动线程
        mt02.start();
        //再开辟一个新的线程
        MyThread_02 mt = new MyThread_02();
        //给线程赋值
        mt.setName("二哥");
        //启动新线程
        mt.start();
        for (int i = 0; i < 10; i++) {
            System.out.println(i);
        }
    }
}
